<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:f="http://xmlns.jcp.org/jsf/core">

    <ui:composition template="/template.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.EditCreditosTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>
            <h:form>
                <h:panelGrid columns="2">
                    <h:outputLabel value="#{bundle.EditCreditosLabel_idCredito}" for="idCredito" />
                    <h:inputText id="idCredito" value="#{creditosController.selected.idCredito}" title="#{bundle.EditCreditosTitle_idCredito}" required="true" requiredMessage="#{bundle.EditCreditosRequiredMessage_idCredito}"/>
                    <h:outputLabel value="#{bundle.EditCreditosLabel_fechaSolicitud}" for="fechaSolicitud" />
                    <h:inputText id="fechaSolicitud" value="#{creditosController.selected.fechaSolicitud}" title="#{bundle.EditCreditosTitle_fechaSolicitud}" required="true" requiredMessage="#{bundle.EditCreditosRequiredMessage_fechaSolicitud}">
                        <f:convertDateTime pattern="MM/dd/yyyy" />
                    </h:inputText>
                    <h:outputLabel value="#{bundle.EditCreditosLabel_valorCuota}" for="valorCuota" />
                    <h:inputText id="valorCuota" value="#{creditosController.selected.valorCuota}" title="#{bundle.EditCreditosTitle_valorCuota}" required="true" requiredMessage="#{bundle.EditCreditosRequiredMessage_valorCuota}"/>
                    <h:outputLabel value="#{bundle.EditCreditosLabel_plazos}" for="plazos" />
                    <h:inputText id="plazos" value="#{creditosController.selected.plazos}" title="#{bundle.EditCreditosTitle_plazos}" required="true" requiredMessage="#{bundle.EditCreditosRequiredMessage_plazos}"/>
                    <h:outputLabel value="#{bundle.EditCreditosLabel_totalCredito}" for="totalCredito" />
                    <h:inputText id="totalCredito" value="#{creditosController.selected.totalCredito}" title="#{bundle.EditCreditosTitle_totalCredito}" required="true" requiredMessage="#{bundle.EditCreditosRequiredMessage_totalCredito}"/>
                    <h:outputLabel value="#{bundle.EditCreditosLabel_estado}" for="estado" />
                    <h:inputText id="estado" value="#{creditosController.selected.estado}" title="#{bundle.EditCreditosTitle_estado}" required="true" requiredMessage="#{bundle.EditCreditosRequiredMessage_estado}"/>
                    <h:outputLabel value="#{bundle.EditCreditosLabel_idEmpleadoCodeudor}" for="idEmpleadoCodeudor" />
                    <h:selectOneMenu id="idEmpleadoCodeudor" value="#{creditosController.selected.idEmpleadoCodeudor}" title="#{bundle.EditCreditosTitle_idEmpleadoCodeudor}" required="true" requiredMessage="#{bundle.EditCreditosRequiredMessage_idEmpleadoCodeudor}">
                        <f:selectItems value="#{usuariosController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                    <h:outputLabel value="#{bundle.EditCreditosLabel_idEmpleadoAdministrador}" for="idEmpleadoAdministrador" />
                    <h:selectOneMenu id="idEmpleadoAdministrador" value="#{creditosController.selected.idEmpleadoAdministrador}" title="#{bundle.EditCreditosTitle_idEmpleadoAdministrador}" required="true" requiredMessage="#{bundle.EditCreditosRequiredMessage_idEmpleadoAdministrador}">
                        <f:selectItems value="#{usuariosController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                    <h:outputLabel value="#{bundle.EditCreditosLabel_idTipoCredito}" for="idTipoCredito" />
                    <h:selectOneMenu id="idTipoCredito" value="#{creditosController.selected.idTipoCredito}" title="#{bundle.EditCreditosTitle_idTipoCredito}" required="true" requiredMessage="#{bundle.EditCreditosRequiredMessage_idTipoCredito}">
                        <f:selectItems value="#{tipocreditoController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                    <h:outputLabel value="#{bundle.EditCreditosLabel_idEmpleadoTitular}" for="idEmpleadoTitular" />
                    <h:selectOneMenu id="idEmpleadoTitular" value="#{creditosController.selected.idEmpleadoTitular}" title="#{bundle.EditCreditosTitle_idEmpleadoTitular}" required="true" requiredMessage="#{bundle.EditCreditosRequiredMessage_idEmpleadoTitular}">
                        <f:selectItems value="#{usuariosController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                </h:panelGrid>
                <h:commandLink action="#{creditosController.update}" value="#{bundle.EditCreditosSaveLink}"/>
                <br />
                <br />
                <h:link outcome="View" value="#{bundle.EditCreditosViewLink}"/>
                <br />
                <h:commandLink action="#{creditosController.prepareList}" value="#{bundle.EditCreditosShowAllLink}" immediate="true"/>
                <br />
                <br />
                <h:link outcome="/index" value="#{bundle.EditCreditosIndexLink}" />
            </h:form>
        </ui:define>
    </ui:composition>

</html>
